home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / lang / amigatalk.lha / intuition / GadgetTags.st < prev    next >
Text File  |  2001-06-02  |  27KB  |  788 lines

  1. " ------------------------------------------------------------------- "
  2. " CheckboxGadgetTag Class allows the User to specify the attributes   "
  3. " for CheckBox Gadgets."
  4. " ------------------------------------------------------------------- "
  5.  
  6. Class CheckboxGadgetTag :Intuition ! tagDictionary !
  7. [
  8.    setKeyMarker: newMark
  9.       ^ tagDictionary at: (super getGadgetAttr: #GT_Underscore) 
  10.                      put: newMark
  11. |
  12.    setCheck
  13.       ^ tagDictionary at: (super getGadToolAttr: #GTCB_Checked) put: true
  14. |
  15.    clearCheck      
  16.       ^ tagDictionary at: (super getGadToolAttr: #GTCB_Checked) put: false
  17. |
  18.    enableCheck
  19.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  20. |
  21.    disableCheck
  22.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  23.    enableScaling
  24.       ^ tagDictionary at: (super getGadToolAttr: #GTCB_Scaled) put: true
  25.    disableScaling
  26.       ^ tagDictionary at: (super getGadToolAttr: #GTCB_Scaled) put: false
  27. |
  28.    getGTUnderscore
  29.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  30. |
  31.    getGADisabled
  32.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  33. |
  34.    getGTCBChecked
  35.       ^ tagDictionary at: (super getGadToolAttr: #GTCB_Checked)
  36. |
  37.    getGTCBScaled
  38.       ^ tagDictionary at: (super getGadToolAttr: #GTCB_Scaled)
  39. |
  40.    new
  41.      tagDictionary <- Dictionary new.
  42.  
  43.      tagDictionary at: (super getGadToolAttr: #GTCB_Checked)  put: false.
  44.      tagDictionary at: (super getGadToolAttr: #GTCB_Scaled)   put: false.
  45.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  46.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  47.  
  48.      ^ self
  49. ]
  50.  
  51. " ------------------------------------------------------------------- "
  52. " CycleGadgetTag Class allows the User to specify the attributes of   "
  53. " Cycle Gadgets."
  54. " ------------------------------------------------------------------- "
  55.  
  56. Class CycleGadgetTag :Intuition ! tagDictionary !
  57. [
  58.    setKeyMarker: newMark
  59.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  60.                      put: newMark
  61. |
  62.    enableCycle
  63.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  64. |
  65.    disableCycle
  66.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  67. |
  68.    setLabelsArray: newStringArray
  69.       ^ tagDictionary at: (super getGadToolAttr: #GTCY_Lables) 
  70.                      put: newStringArray
  71. |
  72.    activate: whichChoice
  73.       ^ tagDictionary at: (super getGadToolAttr: #GTCY_Active) 
  74.                      put: whichChoice
  75. |
  76.    getGTUnderscore
  77.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  78. |
  79.    getGADisabled
  80.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  81. |
  82.    new
  83.      tagDictionary <- Dictionary new.
  84.  
  85.      tagDictionary at: (super getGadToolAttr: #GTCY_Active)   put: 0.
  86.      tagDictionary at: (super getGadToolAttr: #GTCY_Labels)   put: nil.
  87.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  88.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  89.  
  90.      ^ self
  91. ]
  92.  
  93.  
  94. " ------------------------------------------------------------------- "
  95. " ------------------------------------------------------------------- "
  96. Class ListViewGadgetTag :Intuition ! tagDictionary !
  97. [
  98.    setKeyMarker: newMark
  99.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  100.                      put: newMark
  101. |
  102.    enableListView
  103.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  104. |
  105.    disableListView
  106.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  107. |
  108.    setTopItem: itemNumber
  109.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_Top) put: itemNumber
  110. |
  111.    setVisibleItem: itemNumber
  112.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_MakeVisible) 
  113.                      put: itemNumber
  114. |
  115.    setContents: newStringArray
  116.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_Labels) 
  117.                      put: newStringArray
  118. |
  119.    readOnly
  120.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_ReadOnly) put: true
  121. |
  122.    editable
  123.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_ReadOnly) put: false
  124. |
  125.    setMaxPen: penNumber
  126.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_MaxPen) 
  127.                      put: penNumber
  128. |
  129.    setItemHeight: itemHeight
  130.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_ItemHeight) 
  131.                      put: itemHeight
  132. |
  133.    setCallBack: functionPtr
  134.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_CallBack) 
  135.                      put: functionPtr
  136. |
  137.    setScrollWidth: width
  138.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_ScrollWidth) 
  139.                      put: width
  140. |
  141.    setSelectViewer: gadgetObject
  142.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_ShowSelected) 
  143.                      put: gadgetObject
  144. |
  145.    setSelectedItem: itemNumber
  146.       ^ tagDictionary at: (super getGadToolAttr: #GTLV_Selected) 
  147.                      put: itemNumber
  148. |
  149.    setItemSpacing: space
  150.       ^ tagDictionary at: (super getGadgetAttr: #LAYOUTA_Spacing) 
  151.                      put: space
  152. |
  153.    getGTUnderscore
  154.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  155. |
  156.    getGADisabled
  157.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  158. |
  159.    new
  160.      tagDictionary <- Dictionary new.
  161.  
  162.      tagDictionary at: (super getGadToolAttr: #GTLV_Labels)      put: nil.
  163.      tagDictionary at: (super getGadToolAttr: #GTLV_Top)         put: 0.
  164.      tagDictionary at: (super getGadToolAttr: #GTLV_MakeVisible) put: 0.
  165.      tagDictionary at: (super getGadToolAttr: #GTLV_ReadOnly)   put: false.
  166.      tagDictionary at: (super getGadToolAttr: #GTLV_MaxPen)     put: 2.
  167.      tagDictionary at: (super getGadToolAttr: #GTLV_ItemHeight) put: 9.
  168.      tagDictionary at: (super getGadToolAttr: #GTLV_CallBack)   put: nil.
  169.      tagDictionary at: (super getGadToolAttr: #GTLV_ScrollWidth) put: 16.
  170.      tagDictionary at: (super getGadToolAttr: #GTLV_ShowSelected) put: nil.
  171.      tagDictionary at: (super getGadToolAttr: #GTLV_Selected)   put: 0.
  172.      tagDictionary at: (super getGadgetAttr:  #LAYOUTA_Spacing) put: 2.
  173.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)     put: false.
  174.      tagDictionary at: (super getGadToolAttr: #GT_Underscore)   put: $_.
  175.  
  176.      ^ self
  177. ]
  178.  
  179. " ------------------------------------------------------------------- "
  180. " ------------------------------------------------------------------- "
  181. Class RadioGadgetTag :Intuition ! tagDictionary !
  182. [
  183.    setKeyMarker: newMark
  184.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  185.                      put: newMark
  186. |
  187.    enableRadio
  188.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  189. |
  190.    disableRadio
  191.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  192. |
  193.    setRadioLabels: newStringArray
  194.       ^ tagDictionary at: (super getGadToolAttr: #GTMX_Labels)
  195.                      put: newStringArray
  196. |
  197.    placeTitle: where
  198.       ^ tagDictionary at: (super getGadToolAttr: #GTMX_TitlePlace) 
  199.                      put: where
  200. |
  201.    activate: buttonNumber
  202.       ^ tagDictionary at: (super getGadToolAttr: #GTMX_Active) 
  203.                      put: buttonNumber
  204. |
  205.    useScaling
  206.       ^ tagDictionary at: (super getGadToolAttr: #GTMX_Scaled) put: true
  207. |
  208.    clearScaling
  209.       ^ tagDictionary at: (super getGadToolAttr: #GTMX_Scaled) put: false
  210. |
  211.    setButtonSpacing: space
  212.       ^ tagDictionary at: (super getGadToolAttr: #GTMX_Spacing) put: space
  213. |
  214.    getGTUnderscore
  215.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  216. |
  217.    getGADisabled
  218.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  219. |
  220.    new
  221.      tagDictionary <- Dictionary new.
  222.  
  223.      tagDictionary at: (super getGadToolAttr: #GTMX_Labels)     put: nil.
  224.      tagDictionary at: (super getGadToolAttr: #GTMX_TitlePlace) put: 0.
  225.      tagDictionary at: (super getGadToolAttr: #GTMX_Active)     put: 0.
  226.      tagDictionary at: (super getGadToolAttr: #GTMX_Scaled)     put: false.
  227.      tagDictionary at: (super getGadToolAttr: #GTMX_Spacing)    put: 2.
  228.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)     put: false.
  229.      tagDictionary at: (super getGadToolAttr: #GT_Underscore)   put: $_.
  230.  
  231.      ^ self
  232. ]
  233.  
  234. " ------------------------------------------------------------------- "
  235. " ------------------------------------------------------------------- "
  236. Class NumberGadgetTag :Intuition ! tagDictionary !
  237. [
  238.    setKeyMarker: newMark
  239.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  240.                      put: newMark
  241. |
  242.    enableNumber
  243.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  244. |
  245.    disableNumber
  246.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  247. |
  248.    setNumber: newNumber
  249.       ^ tagDictionary at: (super getGadToolAttr: #GTNM_Number) 
  250.                      put: newNumber
  251. |
  252.    leftJustify
  253.       ^ tagDictionary at: (super getGadToolAttr: #GTNM_Justification) 
  254.                      put: 0
  255. |
  256.    rightJustify
  257.       ^ tagDictionary at: (super getGadToolAttr: #GTNM_Justification) 
  258.                      put: 1
  259. |
  260.    centerJustify
  261.       ^ tagDictionary at: (super getGadToolAttr: #GTNM_Justification) 
  262.                      put: 2
  263. |
  264.    useBorder
  265.       ^ tagDictionary at: (super getGadToolAttr: #GTNM_Border) put: true
  266. |
  267.    clearBorder
  268.       ^ tagDictionary at: (super getGadToolAttr: #GTNM_Border) put: false
  269. |
  270.    getGTUnderscore
  271.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  272. |
  273.    getGADisabled
  274.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  275. |
  276.    new
  277.      tagDictionary <- Dictionary new.
  278.  
  279.      tagDictionary at: (super getGadToolAttr: #GTNM_Number)        put: 0.
  280.      tagDictionary at: (super getGadToolAttr: #GTNM_Justification) put: 0.
  281.      tagDictionary at: (super getGadToolAttr: #GTNM_Border)   put: true.
  282.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  283.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  284.  
  285.      ^ self
  286. ]
  287.  
  288. " ------------------------------------------------------------------- "
  289. " ------------------------------------------------------------------- "
  290. Class PaletteGadgetTag :Intuition ! tagDictionary !
  291. [
  292.    setKeyMarker: newMark
  293.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  294.                      put: newMark
  295. |
  296.    enablePalette
  297.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  298. |
  299.    disablePalette
  300.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  301. |
  302.    setDepth: newDepth
  303.       ^ tagDictionary at: (super getGadToolAttr: #GTPA_Depth) put: newDepth
  304. |
  305.    setNumberOfColors: maxNumber 
  306.       ^ tagDictionary at: (super getGadToolAttr: #GTPA_NumColors) 
  307.                      put: maxNumber
  308. |
  309.    selectedColor: penNumber
  310.       ^ tagDictionary at: (super getGadToolAttr: #GTPA_Color) 
  311.                      put: penNumber
  312. |
  313.    setColorOffset: offset
  314.       ^ tagDictionary at: (super getGadToolAttr: #GTPA_ColorOffset) 
  315.                      put: offset
  316. |
  317.    setColorTable: colorTable
  318.       ^ tagDictionary at: (super getGadToolAttr: #GTPA_ColorTable) 
  319.                      put: colorTable
  320. |
  321.    getGTUnderscore
  322.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  323. |
  324.    getGADisabled
  325.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  326. |
  327.    new
  328.      tagDictionary <- Dictionary new.
  329.  
  330.      tagDictionary at: (super getGadToolAttr: #GTPA_Depth)       put: 1.
  331.      tagDictionary at: (super getGadToolAttr: #GTPA_NumColors)   put: 2.
  332.      tagDictionary at: (super getGadToolAttr: #GTPA_Color)       put: 0.
  333.      tagDictionary at: (super getGadToolAttr: #GTPA_ColorOffset) put: 0.
  334.      tagDictionary at: (super getGadToolAttr: #GTPA_ColorTable)  put: nil.
  335.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)      put: false.
  336.      tagDictionary at: (super getGadToolAttr: #GT_Underscore)    put: $_.
  337.  
  338.      ^ self
  339. ]
  340.  
  341. " ------------------------------------------------------------------- "
  342. " ------------------------------------------------------------------- "
  343. Class ScrollerGadgetTag :Intuition ! tagDictionary !
  344. [
  345.    setKeyMarker: newMark
  346.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  347.                      put: newMark
  348. |
  349.    enableScroller
  350.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  351. |
  352.    disableScroller
  353.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  354. |
  355.    setTop: visibleTop
  356.       ^ tagDictionary at: (super getGadToolAttr: #GTSC_Top) put: visibleTop
  357. |
  358.    setTotal: newTotal
  359.       ^ tagDictionary at: (super getGadToolAttr: #GTSC_Total) put: newTotal
  360. |
  361.    setNumber: newNumber
  362.       ^ tagDictionary at: (super getGadToolAttr: #GTSC_Visible) 
  363.                      put: newNumber
  364. |
  365.    useArrows: arrowSize
  366.       ^ tagDictionary at: (super getGadToolAttr: #GTSC_Arrows) 
  367.                      put: arrowSize
  368. |
  369.    verticalScroller
  370.       ^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 2
  371. |
  372.    horizontalScroller
  373.       ^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 1
  374. |
  375.    useImmediate
  376.       ^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: true
  377. |
  378.    clearImmediate
  379.       ^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false
  380. |
  381.    useRelease
  382.       ^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: true
  383. |
  384.    clearRelease
  385.       ^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: false
  386. |
  387.    getGTUnderscore
  388.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  389. |
  390.    getGADisabled
  391.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  392. |
  393.    new
  394.      tagDictionary <- Dictionary new.
  395.  
  396.      tagDictionary at: (super getGadToolAttr: #GTSC_Top)      put: 0.
  397.      tagDictionary at: (super getGadToolAttr: #GTSC_Total)    put: 15.
  398.      tagDictionary at: (super getGadToolAttr: #GTSC_Arrows)   put: 20.
  399.      tagDictionary at: (super getGadToolAttr: #GTSC_Visible)  put: 0.
  400.      tagDictionary at: (super getGadgetAttr:  #PGA_Freedom)   put: 0.
  401.      tagDictionary at: (super getGadgetAttr:  #GA_Immediate)  put: false.
  402.      tagDictionary at: (super getGadgetAttr:  #GA_RelVerify)  put: false.
  403.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  404.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  405.  
  406.      ^ self
  407. ]
  408.  
  409. " ------------------------------------------------------------------- "
  410. " ------------------------------------------------------------------- "
  411. Class SliderGadgetTag :Intuition ! tagDictionary !
  412. [
  413.    setKeyMarker: newMark
  414.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  415.                      put: newMark
  416. |
  417.    enableSlider
  418.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  419. |
  420.    disableSlider
  421.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  422. |
  423.    setMinimum: newMin
  424.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_Min) put: newMin
  425. |
  426.    setMaximum: newMax
  427.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_Max) put: newMax
  428. |
  429.    setCurrentLevel: newLevel
  430.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_Level) put: newLevel
  431. |
  432.    setLevelFormat: formatString
  433.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelFormat) 
  434.                      put: formatString
  435. |
  436.    setFormatLength: newMaxLength
  437.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_MaxLevelLen) 
  438.                      put: newMaxLength
  439. |
  440.    placeLevelLeft
  441.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 1
  442. |
  443.    placeLevelRight
  444.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 2
  445. |
  446.    placeLevelAbove
  447.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 4
  448. |
  449.    placeLevelBelow
  450.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace) put: 8
  451. |
  452.    setDisplayFunction: functionPtr
  453.       ^ tagDictionary at: (super getGadToolAttr: #GTSL_DispFunc) 
  454.                      put: functionPtr
  455. |
  456.    verticalSlider
  457.       ^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 2
  458. |
  459.    horizontalSlider
  460.       ^ tagDictionary at: (super getGadgetAttr: #PGA_Freedom) put: 1
  461. |
  462.    useImmediate
  463.       ^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: true
  464. |
  465.    clearImmediate
  466.       ^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false
  467. |
  468.    useRelease
  469.       ^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: true
  470. |
  471.    clearRelease
  472.       ^ tagDictionary at: (super getGadgetAttr: #GA_RelVerify) put: false
  473. |
  474.    getGTUnderscore
  475.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  476. |
  477.    getGADisabled
  478.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  479. |
  480.    new
  481.      tagDictionary <- Dictionary new.
  482.  
  483.      tagDictionary at: (super getGadToolAttr: #GTSL_Min)         put: 0.
  484.      tagDictionary at: (super getGadToolAttr: #GTSL_Max)         put: 15.
  485.      tagDictionary at: (super getGadToolAttr: #GTSL_Level)       put: 0.
  486.      tagDictionary at: (super getGadToolAttr: #GTSL_LevelFormat) put: nil.
  487.      tagDictionary at: (super getGadToolAttr: #GTSL_MaxLevelLen) put: 10.
  488.      tagDictionary at: (super getGadToolAttr: #GTSL_LevelPlace)  put: 1.
  489.      tagDictionary at: (super getGadToolAttr: #GTSL_DispFunc) put: nil.
  490.      tagDictionary at: (super getGadgetAttr:  #PGA_Freedom)   put: 0.
  491.      tagDictionary at: (super getGadgetAttr:  #GA_Immediate)  put: false.
  492.      tagDictionary at: (super getGadgetAttr:  #GA_RelVerify)  put: false.
  493.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  494.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  495.  
  496.      ^ self
  497. ]
  498.  
  499. " ------------------------------------------------------------------- "
  500. " ------------------------------------------------------------------- "
  501. Class TextGadgetTag :Intuition ! tagDictionary !
  502. [
  503.    setKeyMarker: newMark
  504.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  505.                      put: newMark
  506. |
  507.    enableText
  508.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  509. |
  510.    disableText
  511.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  512. |
  513.    setText: newTextString
  514.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Text) 
  515.                      put: newTextString
  516. |
  517.    useBorder
  518.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Border) put: true
  519. |
  520.    clearBorder
  521.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Border) put: false
  522. |
  523.    setFrontPen: newPen
  524.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_FrontPen) 
  525.                      put: newPen
  526. |
  527.    setBackPen: newPen
  528.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_BackPen) 
  529.                      put: newPen
  530. |
  531.    leftJustify
  532.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Justification) 
  533.                      put: 0
  534. |
  535.    rightJustify
  536.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Justification) 
  537.                      put: 1
  538. |
  539.    centerJustify
  540.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Justification) 
  541.                      put: 2
  542. |
  543.    useClipping
  544.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Clipped) put: true
  545. |
  546.    clearClipping
  547.       ^ tagDictionary at: (super getGadToolAttr: #GTTX_Clipped) put: false
  548. |
  549.    getGTUnderscore
  550.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  551. |
  552.    getGADisabled
  553.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  554. |
  555.    new
  556.      tagDictionary <- Dictionary new.
  557.  
  558.      tagDictionary at: (super getGadToolAttr: #GTTX_Text)     put: nil.
  559.      tagDictionary at: (super getGadToolAttr: #GTTX_Border)   put: true.
  560.      tagDictionary at: (super getGadToolAttr: #GTTX_Clipped)  put: false.
  561.      tagDictionary at: (super getGadToolAttr: #GTTX_FrontPen)      put: 1.
  562.      tagDictionary at: (super getGadToolAttr: #GTTX_BackPen)       put: 0.
  563.      tagDictionary at: (super getGadToolAttr: #GTTX_Justification) put: 0.
  564.      tagDictionary at: (super getGadgetAttr:  #GA_Disable)    put: false.
  565.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  566.  
  567.      ^ self
  568. ]
  569.  
  570. " ------------------------------------------------------------------- "
  571. " ------------------------------------------------------------------- "
  572. Class IntegerGadgetTag :Intuition ! tagDictionary !
  573. [
  574.    setKeyMarker: newMark
  575.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  576.                      put: newMark
  577. |
  578.    enableInteger
  579.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  580. |
  581.    disableInteger
  582.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  583. |
  584.    setInteger: newInteger
  585.       ^ tagDictionary at: (super getGadToolAttr: #GTIN_Number) 
  586.                      put: newInteger
  587. |
  588.    setMaxDigits: newMaximum
  589.       ^ tagDictionary at: (super getGadToolAttr: #GTIN_MaxChars) 
  590.                      put: newMaximum
  591. |
  592.    useHelpKey
  593.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp) 
  594.                      put: true
  595. |
  596.    clearHelpKey
  597.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp) 
  598.                      put: false
  599. |
  600.    useTabCycle
  601.       ^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: true
  602. |
  603.    clearTabCycle
  604.       ^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: false
  605. |
  606.    setEditHook: hookFunction
  607.       ^ tagDictionary at: (super getGadToolAttr: #GTIN_EditHook) 
  608.                      put: hookFunction
  609. |
  610.    rightJustify
  611.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification) 
  612.                      put: 1
  613. |
  614.    leftJustify
  615.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification) 
  616.                      put: 0
  617. |
  618.    centerJustify
  619.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification) 
  620.                      put: 2
  621. |
  622.    useReplaceMode
  623.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode) 
  624.                      put: true
  625. |
  626.    useInsertMode
  627.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode) 
  628.                      put: false
  629. |
  630.    getGTUnderscore
  631.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  632. |
  633.    getGADisabled
  634.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  635. |
  636.    new
  637.      tagDictionary <- Dictionary new.
  638.  
  639.      tagDictionary at: (super getGadToolAttr: #GTIN_Number)   put: 0.
  640.      tagDictionary at: (super getGadToolAttr: #GTIN_MaxChars) put: 10.
  641.  
  642.      tagDictionary at: (super getGadgetAttr:  #GA_TabCycle)   put: false.
  643.      tagDictionary at: (super getGadToolAttr: #GTIN_EditHook) put: nil.
  644.  
  645.      tagDictionary at: (super getGadgetAttr:  #STRINGA_Justification) 
  646.                   put: 0.
  647.  
  648.      tagDictionary at: (super getGadgetAttr:  #STRING_ReplaceMode) 
  649.                   put: false.
  650.  
  651.      tagDictionary at: (super getGadgetAttr:  #STRINGA_ExitHelp) 
  652.                   put: false.
  653.  
  654.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  655.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  656.  
  657.      ^ self
  658. ]
  659.  
  660. " ------------------------------------------------------------------- "
  661. " ------------------------------------------------------------------- "
  662. Class StringGadgetTag :Intuition ! tagDictionary !
  663. [
  664.    setKeyMarker: newMark
  665.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  666.                      put: newMark
  667. |
  668.    enableString
  669.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  670. |
  671.    disableString
  672.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  673. |
  674.    setString: newString
  675.       ^ tagDictionary at: (super getGadToolAttr: #GTST_String) 
  676.                      put: newString
  677. |
  678.    setStringLength: maxLength
  679.       ^ tagDictionary at: (super getGadToolAttr: #GTST_MaxChars) 
  680.                      put: maxLength
  681. |
  682.    useHelpKey
  683.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ExitHelp) 
  684.                      put: true
  685. |
  686.    clearHelpKey
  687.       ^ tagDictionary at: (super getGadgetAttr: #STRING_ExitHelp) 
  688.                      put: false
  689. |
  690.    useTabCycle
  691.       ^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: true
  692. |
  693.    clearTabCycle
  694.       ^ tagDictionary at: (super getGadgetAttr: #GA_TabCycle) put: false
  695. |
  696.    setEditHook: hookFunction
  697.       ^ tagDictionary at: (super getGadToolAttr: #GTST_EditHook) 
  698.                      put: hookFunction
  699. |
  700.    rightJustify
  701.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification) 
  702.                      put: 1
  703. |
  704.    leftJustify
  705.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
  706.                      put: 0
  707. |
  708.    centerJustify
  709.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_Justification)
  710.                      put: 2
  711. |
  712.    useReplaceMode
  713.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode) 
  714.                      put: true
  715. |
  716.    useInsertMode
  717.       ^ tagDictionary at: (super getGadgetAttr: #STRINGA_ReplaceMode) 
  718.                      put: false
  719. |
  720.    getGTUnderscore
  721.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  722. |
  723.    getGADisabled
  724.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  725. |
  726.    new
  727.      tagDictionary <- Dictionary new.
  728.  
  729.      tagDictionary at: (super getGadToolAttr: #GTST_String)   put: nil.
  730.      tagDictionary at: (super getGadToolAttr: #GTST_MaxChars) put: 10.
  731.  
  732.      tagDictionary at: (super getGadgetAttr:  #STRINGA_ExitHelp) 
  733.                   put: false.
  734.  
  735.      tagDictionary at: (super getGadgetAttr:  #STRINGA_Justification) 
  736.                   put: 0.
  737.  
  738.      tagDictionary at: (super getGadgetAttr:  #STRINGA_ReplaceMode) 
  739.                   put: false.
  740.  
  741.      tagDictionary at: (super getGadgetAttr:  #GA_TabCycle)   put: false.
  742.      tagDictionary at: (super getGadToolAttr: #GTST_EditHook) put: nil.
  743.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  744.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  745.  
  746.      ^ self
  747. ]
  748.  
  749. " ------------------------------------------------------------------- "
  750. " ButtonGadgetTag Class allows the user to specify the attributes of  "
  751. " a BUTTON_KIND Gadget that is going to be used in a GUI."
  752. " ------------------------------------------------------------------- "
  753.  
  754. Class ButtonGadgetTag :Intuition ! tagDictionary !
  755. [
  756.    enableButton
  757.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: false
  758. |
  759.    disableButton
  760.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled) put: true
  761. |
  762.    setKeyMarker: newMark
  763.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore) 
  764.                      put: newMark
  765. |
  766.    getGTUnderscore
  767.       ^ tagDictionary at: (super getGadToolAttr: #GT_Underscore)
  768. |
  769.    getGADisabled
  770.       ^ tagDictionary at: (super getGadgetAttr: #GA_Disabled)
  771. |
  772.    useImmediate
  773.       ^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: true
  774. |
  775.    clearImmediate
  776.       ^ tagDictionary at: (super getGadgetAttr: #GA_Immediate) put: false
  777. |
  778.    new
  779.      tagDictionary <- Dictionary new.
  780.      tagDictionary at: (super getGadgetAttr:  #GA_Disabled)   put: false.
  781.      tagDictionary at: (super getGadgetAttr:  #GA_Immediate)  put: false.
  782.      tagDictionary at: (super getGadToolAttr: #GT_Underscore) put: $_.
  783.      ^ self
  784. ]
  785.  
  786.